# Contributor: Shannon Noe <snoe925@gmail.com>
# Maintainer: rubicon <rubicon@mailo.com>
pkgname=tclx
pkgver=8.6.3
pkgrel=1
pkgdesc="TclX extension to Tcl"
url="https://github.com/flightaware/tclx"
arch="all"
license="BSD"
depends="tcl"
depends_dev="tcl-dev"
makedepends="$depends_dev"
checkdepends="bash"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/flightaware/tclx/archive/v$pkgver.tar.gz
	convlib-filepath.patch
	process-test.patch
	"

build() {
	local _64bit="--disable-64bit"
	case "$CARCH" in
	x86_64) _64bit="--enable-64bit";;
	esac
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-threads \
		$_64bit
	make
}

check() {
	make test TESTFLAGS="-verbose pbtels"
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="
680b8916ccb5725ed173b45549c94e7b1e17c4e5cf700c3991d2791b9f299660e94c880401dccfbff7ca630036c0781c41a9692c2d8ead2e7ad880e2e05a69e7  tclx-8.6.3.tar.gz
c85eba3a45fdd4d19cac6ed01bcdd720de5f1efbdf43f7eb9d6f3db884282a39781991c659e47250476b8632d9dc862152a27613fd1e7c3479496a2b56361501  convlib-filepath.patch
54044611c72f0355bd906f78327605b9f350e265a185478d2e77a32a2b00ef532da8395f7571b470fc9e066ec424b18d295b1b5245e3da64dac0cf57b57f1fd1  process-test.patch
"
